package com.vp.org.service.impl;

import com.vp.org.dao.impl.UserDaoImpl;
import com.vp.org.pojo.UserInfo;
import com.vp.org.service.UserService;

@SuppressWarnings("unused")
public class UserServiceImpl extends UserDaoImpl implements UserService {

    @Override
    public int addUser(UserInfo info) {
        return add(info);
    }

    @Override
    public int checkPhone(UserInfo info) {
        return queryByPhone(info);
    }

    @Override
    public UserInfo getUserInfo(UserInfo info) {
        UserInfo user = null;

        // 如果检查到用户名密码正确就返回user全部信息 否则返回null
        if (checkForInfo(info) > 0)
            user = queryForInfo(info);

        return user;
    }
}
